//
// Generated by Microsoft (R) HLSL Shader Compiler 10.0.10011.16384
//
//   using 3Dmigoto v1.3.16 on Tue Mar 15 22:27:45 2022
//
//
// Buffer Definitions:
//
// cbuffer ConstBuf__batchData
// {
//
//   struct BatchDataTransparent
//   {
//
//       struct LightTileParameters
//       {
//
//           uint4 lightIndices[8];     // Index:    0
//
//       } objectLights;                // Index:    0
//
//       struct GIVolume
//       {
//
//           float3 invTransX;          // Index:    8
//           float3 invTransY;          // Index:    9
//           float3 invTransZ;          // Index:   10
//           float3 invTransT;          // Index:   11
//           float3 invRotX;            // Index:   12
//           float3 invRotY;            // Index:   13
//           float3 invRotZ;            // Index:   14
//           uint3 indDims;             // Index:   15
//           float3 invIndDims;         // Index:   16
//           uint3 atlasDims;           // Index:   17
//           float3 invAtlasDims;       // Index:   18
//           float4 cr1Min;             // Index:   19
//           float4 cr1MaxSubMin;       // Index:   20
//           float4 cr2Min;             // Index:   21
//           float4 cr2MaxSubMin;       // Index:   22
//           float4 cr3Min;             // Index:   23
//           float4 cr3MaxSubMin;       // Index:   24
//           float normalOffset;        // Index:   25
//           float4 giTintScaled;       // Index:   26
//           uint flags;                // Index:   27
//
//       } giVolume[3];                 // Index:    8
//       float4 m_EnvironmentMapSHR;    // Index:   68
//       float4 m_EnvironmentMapSHG;    // Index:   69
//       float4 m_EnvironmentMapSHB;    // Index:   70
//       float2 m_EnvironmentMapRotation;// Index:   71
//       int m_EnvironmentMapMipCount;  // Index:   71.z
//
//       struct RflGeometryProxyOBB
//       {
//
//           float4 m_WS2OBBSrow0;      // Index:   72
//           float4 m_WS2OBBSrow1;      // Index:   73
//           float4 m_WS2OBBSrow2;      // Index:   74
//           float3 m_halfExtents;      // Index:   75
//           float3 m_cubeCapturePos;   // Index:   76
//
//       } m_EnvironmentProxy;          // Index:   72
//       uint particleSystemIndex;      // Index:   76.w
//
//       struct LightParameters
//       {
//
//           float3 color;              // Index:   77
//           uint lightgroupID;         // Index:   77.w
//           float3 position;           // Index:   78
//           float sourceRadiusSquared; // Index:   78.w
//           float falloffConstant;     // Index:   79
//           float innerMinusOuterCosHalfAngleRcp;// Index:   79.y
//           float outerCosHalfAngle;   // Index:   79.z
//           float dirLightHalfAngle;   // Index:   79.w
//           float3 direction;          // Index:   80
//           float dirLightSolidAngle;  // Index:   80.w
//           int projectorIndex;        // Index:   81
//           float fadeStartOnDist;     // Index:   81.y
//           float fadeRcpDist;         // Index:   81.z
//           float fadeRate;            // Index:   81.w
//
//       } bonusMirrorLight;            // Index:   77
//       float4x4 worldToShadowRegionUV;// Index:   82
//       float shadowFadeFactor;        // Index:   86
//       uint numGIVolumes;             // Index:   86.y
//       bool useBonusMirrorLight;      // Index:   86.z
//       bool useShadowMap;             // Index:   86.w
//
//   } resourceTables__batchData;       // Index:    0-86             Components:   348
//
// }
//
// cbuffer ConstBuf__viewData
// {
//
//   struct ViewData
//   {
//
//       float4x4 view;                 // Index:    0
//       float4x4 invView;              // Index:    4
//       float4x4 proj;                 // Index:    8
//       float4x4 invViewProjNoZReproj; // Index:   12
//       float4x4 viewProj;             // Index:   16
//       float4x4 invViewProj;          // Index:   20
//       float4x4 previousViewProj;     // Index:   24
//       float4 prevLodEyePos;          // Index:   28
//       float4 lodEyePos;              // Index:   29
//       float4 viewDirDepthBias;       // Index:   30
//       float3 eyePos;                 // Index:   31
//       float2 viewportSize;           // Index:   32
//       float2 invViewportSize;        // Index:   32.z
//       float4 mirrorPlaneWS;          // Index:   33
//       float2 mirrorViewportSize;     // Index:   34
//       float2 opaqueRefractionViewportSize;// Index:   34.z
//       float windTime;                // Index:   35
//       float deltaTime;               // Index:   35.y
//       float depthReprojectScale;     // Index:   35.z
//       float depthReprojectBias;      // Index:   35.w
//       uint shadowViewType;           // Index:   36
//       float normalDepthBias;         // Index:   36.y
//       float noNormalAA;              // Index:   36.z
//       float noNormalFromAlpha;       // Index:   36.w
//       float noOpaqueTransparency;    // Index:   37
//       float translucentAmount;       // Index:   37.y
//       uint framePhase;               // Index:   37.z
//       float cameraAmbientExposure;   // Index:   37.w
//       float fxExposure;              // Index:   38
//       float fxAmbientExposure;       // Index:   38.y
//       uint checkerboardPhase;        // Index:   38.z
//       float sparkleIntensityScale;   // Index:   38.w
//
//   } resourceTables__viewData;        // Index:    0-38             Components:   156
//
// }
//
// Resource bind info for resourceTables__passData.systemData
// {
//
//   struct ParticleGPUSystemData
//   {
//
//       float4x4 cSystemToWorld;       // Index:    0
//       uint cameraID;                 // Index:    4
//       uint cDrawArgStart;            // Index:    4.y
//       float4 textureFlipbookVecs[10];// Index:    4.z
//       float3 cSpriteCenter;          // Index:   14.z
//       float3 cSpriteSize;            // Index:   15.y
//       float3 cSpriteSizeRandom;      // Index:   16
//       float2 cUVScale;               // Index:   16.w
//       float2 cUVOffset;              // Index:   17.y
//       float2 cUVScroll;              // Index:   17.w
//       uint cRibbonUVMode;            // Index:   18.y
//       float cTimeStep;               // Index:   18.z
//       uint cFlags;                   // Index:   18.w
//       float cLifeTime;               // Index:   19
//       float cLifeTimeRandom;         // Index:   19.y
//       float cFogDensityStrength;     // Index:   19.z
//       float cAge;                    // Index:   19.w
//       uint systemRandom;             // Index:   20
//       uint cAlignMode;               // Index:   20.y
//       uint cSecondaryAlignMode;      // Index:   20.z
//       uint cBlendMode;               // Index:   20.w
//       float cAngleFadeRate;          // Index:   21
//       float cSoftDistance;           // Index:   21.y
//       float cSoftDistanceInverse;    // Index:   21.z
//       float cVelocityScale;          // Index:   21.w
//       float cVelocityScaleClamp;     // Index:   22
//       float cExternalScale;          // Index:   22.y
//       float cSpriteRotation;         // Index:   22.z
//       float cSpriteCameraOffset;     // Index:   22.w
//       float cStaticTwist;            // Index:   23
//       float cTwistSpeed;             // Index:   23.y
//       uint cTwistDirection;          // Index:   23.z
//       float cMaxExtent;              // Index:   23.w
//       float cColorModulate;          // Index:   24
//       float cColorRandom;            // Index:   24.y
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   24.z
//           float end;                 // Index:   24.w
//           uint type;                 // Index:   25
//           float alpha;               // Index:   25.y
//           float jitter;              // Index:   25.z
//
//       } cParticleColorBlend;         // Index:   24.z
//       float4 cColorTintModulate;     // Index:   25.w
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   26.w
//           float end;                 // Index:   27
//           uint type;                 // Index:   27.y
//           float alpha;               // Index:   27.z
//           float jitter;              // Index:   27.w
//
//       } cNormalMapIntensity;         // Index:   26.w
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   28
//           float end;                 // Index:   28.y
//           uint type;                 // Index:   28.z
//           float alpha;               // Index:   28.w
//           float jitter;              // Index:   29
//
//       } cOpacity;                    // Index:   28
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   29.y
//           float end;                 // Index:   29.z
//           uint type;                 // Index:   29.w
//           float alpha;               // Index:   30
//           float jitter;              // Index:   30.y
//
//       } cOpacityTexturesExponent;    // Index:   29.y
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   30.z
//           float end;                 // Index:   30.w
//           uint type;                 // Index:   31
//           float alpha;               // Index:   31.y
//           float jitter;              // Index:   31.z
//
//       } cScale;                      // Index:   30.z
//       float cCameraScaleStartDistance;// Index:   31.w
//       float cCameraScaleStartValue;  // Index:   32
//       float cCameraScaleEndDistance; // Index:   32.y
//       float cCameraScaleEndValue;    // Index:   32.z
//       float cCameraOneOverEndMinusStart;// Index:   32.w
//       uint cFlipbookPageCount;       // Index:   33
//       float cFlipbookPageCycle;      // Index:   33.y
//       float cNearCull;               // Index:   33.z
//       float cFarCull;                // Index:   33.w
//       float cNearFade;               // Index:   34
//       float cFarFade;                // Index:   34.y
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   34.z
//           float end;                 // Index:   34.w
//           uint type;                 // Index:   35
//           float alpha;               // Index:   35.y
//           float jitter;              // Index:   35.z
//
//       } cDrag;                       // Index:   34.z
//       float3 cGravity;               // Index:   35.w
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   36.z
//           float end;                 // Index:   36.w
//           uint type;                 // Index:   37
//           float alpha;               // Index:   37.y
//           float jitter;              // Index:   37.z
//
//       } cGravityIntensity;           // Index:   36.z
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   37.w
//           float end;                 // Index:   38
//           uint type;                 // Index:   38.y
//           float alpha;               // Index:   38.z
//           float jitter;              // Index:   38.w
//
//       } cWindInfluenceOverLifeTime;  // Index:   37.w
//       float cMinDistance;            // Index:   39
//       float cMaxDistance;            // Index:   39.y
//       float3 cTurbulenceFrequency;   // Index:   39.z
//       float3 cTurbulenceAmplitude;   // Index:   40.y
//       float3 cTurbulencePhase;       // Index:   41
//       float3 cTurbulenceScrollSpeed; // Index:   41.w
//
//       struct ParticleGPUAttributeData
//       {
//
//           float start;               // Index:   42.z
//           float end;                 // Index:   42.w
//           uint type;                 // Index:   43
//           float alpha;               // Index:   43.y
//           float jitter;              // Index:   43.z
//
//       } cTurbulenceIntensity;        // Index:   42.z
//       uint cActiveFields;            // Index:   43.w
//
//       struct ParticleGPUFieldData
//       {
//
//           float3 position;           // Index:   44
//           float attenuation;         // Index:   44.w
//           float3 direction;          // Index:   45
//           float maxDistance;         // Index:   45.w
//           float magnitude;           // Index:   46
//           float _pad0;               // Index:   46.y
//           float _pad1;               // Index:   46.z
//           float _pad2;               // Index:   46.w
//
//       } cFields[4];                  // Index:   44
//       float cNewtonMinDistance;      // Index:   56
//       float cCollisionBounciness;    // Index:   56.y
//       float cCollisionBouncinessRandom;// Index:   56.z
//       float cCollisionRadius;        // Index:   56.w
//       float cDepthCollisionAgeThreshold;// Index:   57
//       float cDepthCollisionThreshold;// Index:   57.y
//       float cPlaneCollisionHeight;   // Index:   57.z
//       float3 emitterPosition;        // Index:   57.w
//       float3 emitterVelocity;        // Index:   58.z
//       float3 velocityDirectionWorld; // Index:   59.y
//       float3x3 emitterOrientation;   // Index:   60
//       float emitterDistance;         // Index:   62.y
//       float cMFXEventProbability;    // Index:   62.z
//       uint4 ramp1Indices[2];         // Index:   62.w
//       uint4 ramp3Indices;            // Index:   64.w
//       uint4 ramp1Constants[2];       // Index:   65.w
//       float4 ramp3Constants;         // Index:   67.w
//
//   } $Element;                        // Index:    0-68.z           Components:   275
//
// }
//
// Resource bind info for resourceTables__passData.ramp1Data
// {
//
//   struct ParticleGPURamp1Data
//   {
//
//       float multiplier;              // Index:    0
//       float offset;                  // Index:    0.y
//
//   } $Element;                        // Index:    0.xy             Components:     2
//
// }
//
// Resource bind info for resourceTables__passData.ramp3Data
// {
//
//   struct ParticleGPURamp3Data
//   {
//
//       float3 multiplier;             // Index:    0
//       float3 offset;                 // Index:    0.w
//
//   } $Element;                        // Index:    0-1.y            Components:     6
//
// }
//
//
// Resource Bindings:
//
// Name                                 Type  Format         Dim Slot Elements
// ------------------------------ ---------- ------- ----------- ---- --------
// resourceTables__passData__smpLinearClamp    sampler      NA          NA    0        1
// resourceTables__viewData__smpLinearClamp    sampler      NA          NA    6        1
// resourceTables__passData.systemData    texture  struct         r/o    7        1
// resourceTables__passData.ramp1Data    texture  struct         r/o   13        1
// resourceTables__passData.ramp3Data    texture  struct         r/o   14        1
// resourceTables__passData.ramp1Textures    texture   float          2d   15        1
// resourceTables__passData.ramp3Textures    texture  float3          2d   16        1
// resourceTables__passData.linearDepthTexture    texture   float          2d   20        1
// resourceTables__passData.bilateralVectorsTexture    texture  float2          2d   21        1
// ConstBuf__batchData               cbuffer      NA          NA    2        1
// ConstBuf__viewData                cbuffer      NA          NA    3        1
//
//
//
// Input signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_POSITION              0   xyzw        0      POS   float   xy
// POSITION                 0   xyz         1     NONE   float
// NORMAL                   0   xyz         2     NONE   float
// TEXCOORD                 0   xy          3     NONE   float   xy
// TEXCOORD                 1   xyz         4     NONE   float     z
// COLOR                    0   xyzw        5     NONE   float
// COLOR                    1   xyzw        6     NONE   float   xyzw
// TEXCOORD                 2   xyzw        7     NONE   float    y
// TEXCOORD                 3   x           8     NONE    uint
// TEXCOORD                 7   xyz         9     NONE   float   xyz
// TEXCOORD                 8   xyz        10     NONE   float   xyz
// TEXCOORD                 9   xyz        11     NONE   float
// TEXCOORD                10   xyz        12     NONE   float
//
//
// Output signature:
//
// Name                 Index   Mask Register SysValue  Format   Used
// -------------------- ----- ------ -------- -------- ------- ------
// SV_Target                0   xyzw        0   TARGET   float   xyzw
//
ps_5_0
dcl_globalFlags refactoringAllowed
dcl_constantbuffer cb2[77], immediateIndexed
dcl_constantbuffer cb3[39], immediateIndexed
dcl_sampler s0, mode_default
dcl_sampler s6, mode_default
dcl_resource_structured t7, 1100
dcl_resource_structured t13, 8
dcl_resource_structured t14, 24
dcl_resource_texture2d (float,float,float,float) t15
dcl_resource_texture2d (float,float,float,float) t16
dcl_resource_texture2d (float,float,float,float) t20
dcl_resource_texture2d (float,float,float,float) t21
dcl_input_ps_siv linear noperspective v0.xy, position
dcl_input_ps linear v3.xy
dcl_input_ps linear v4.z
dcl_input_ps linear v6.xyzw
dcl_input_ps linear v7.y
dcl_input_ps linear v9.xyz
dcl_input_ps linear v10.xyz
dcl_output o0.xyzw
dcl_temps 6
frc r0.xyzw, v3.xyxy
add r1.xyzw, -r0.xyzw, l(1.000000, 1.000000, 0.500000, 0.500000)
mul r0.x, r0.z, r1.x
log r0.x, r0.x
mul r0.x, r0.x, l(0.100760)
exp r0.x, r0.x
add r0.x, r0.x, r0.x
log r0.y, r1.y
mul r0.y, r0.y, l(0.809371)
exp r0.y, r0.y
log r0.z, r0.w
mul r0.z, r0.z, l(0.155118)
exp r0.z, r0.z
mul r0.y, r0.y, r0.z
mul r0.x, r0.y, r0.x
add r0.yz, -|r1.zzwz|, l(0.000000, 0.500000, 0.500000, 0.000000)
mul r0.yz, r0.yyzy, l(0.000000, 3.48077917, 3.48077917, 0.000000)
min r0.yz, r0.yyzy, l(0.000000, 1.000000, 1.000000, 0.000000)
mad r0.yz, r0.yyzy, l(0.000000, 3.14159274, 3.14159274, 0.000000), l(0.000000, -1.57079637, -1.57079637, 0.000000)
sincos r0.yz, null, r0.yyzy
mad r0.yz, r0.yyzy, l(0.000000, 0.500000, 0.500000, 0.000000), l(0.000000, 0.500000, 0.500000, 0.000000)
mul r0.y, r0.z, r0.y
mul r0.x, r0.y, r0.x
ge r0.y, l(4.093169975E-021), r0.x
discard_nz r0.y
ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r0.yz, cb2[76].w, l(340), t7.xxyx
eq r1.xy, r0.yzyy, l(0.000000, 0.000000, 0.000000, 0.000000)
and r0.w, r1.y, r1.x
if_z r0.w
  ftoi r1.xy, v0.xyxx
  mov r1.zw, l(0,0,0,0)
  ld_indexable(texture2d)(float,float,float,float) r1.xy, r1.xyzw, t21.xyzw
  mad r1.xy, r1.xyxx, l(8.000000, 8.000000, 0.000000, 0.000000), v0.xyxx
  mul r1.xy, r1.xyxx, cb3[32].zwzz
  sample_l_indexable(texture2d)(float,float,float,float) r0.w, r1.xyxx, t20.yzwx, s6, l(0.000000)
  add r0.w, r0.w, v4.z
  lt r1.x, l(0.000000), r0.z
  div r0.z, l(1.000000, 1.000000, 1.000000, 1.000000), r0.z
  and r0.z, r0.z, r1.x
  div r0.y, r0.w, r0.y
  min r0.y, |r0.y|, l(1.000000)
  mul r1.x, r0.y, r0.y
  mad r0.y, -r0.y, l(2.000000), l(3.000000)
  mul r0.y, r0.y, r1.x
  mul r0.z, r0.z, r0.w
  min r0.z, |r0.z|, l(1.000000)
  mul r0.w, r0.z, r0.z
  mad r0.z, -r0.z, l(2.000000), l(3.000000)
  mad r0.z, -r0.w, r0.z, l(1.000000)
  mul r0.y, r0.z, r0.y
else
  mov r0.y, l(1.000000)
endif
mul_sat r0.x, r0.y, r0.x
lt r0.y, r0.x, l(0.040450)
mul r0.z, r0.x, l(0.0773993805)
add r0.x, r0.x, l(0.055000)
mul r0.x, r0.x, l(0.947867334)
log r0.x, r0.x
mul r0.x, r0.x, l(2.400000)
exp r0.x, r0.x
movc r0.x, r0.y, r0.z, r0.x
ge r0.y, l(4.093169975E-021), r0.x
discard_nz r0.y
ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r0.y, cb2[76].w, l(300), t7.xxxx
ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r1.xyzw, cb2[76].w, l(412), t7.xyzw
ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r0.z, cb2[76].w, l(1024), t7.xxxx
mov_sat r2.xyzw, r1.xyzw
and r0.y, r0.y, l(512)
mov r3.x, l(1.000000)
mov r3.w, v6.w
movc r3.xyzw, r0.yyyy, r3.xxxw, v6.xyzw
mul r3.w, r0.x, r3.w
mul r2.xyzw, r2.xyzw, r3.xyzw
ieq r0.xw, r0.zzzz, l(-2, 0, 0, -3)
or r0.w, r0.w, r0.x
if_z r0.w
  ld_structured_indexable(structured_buffer, stride=8)(mixed,mixed,mixed,mixed) r3.xy, r0.z, l(0), t13.xyxx
  utof r0.z, r0.z
  add r0.z, r0.z, l(0.500000)
  mul r4.y, r0.z, l(0.000244140625)
  mov r4.x, v7.y
  sample_l_indexable(texture2d)(float,float,float,float) r0.z, r4.xyxx, t15.yzxw, s0, l(0.000000)
  mad r0.z, r3.x, r0.z, r3.y
else
  ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r0.w, cb2[76].w, l(1072), t7.xxxx
  f16tof32 r1.w, r0.w
  ushr r0.w, r0.w, l(16)
  f16tof32 r0.w, r0.w
  mov_sat r3.x, v7.y
  add r0.w, -r1.w, r0.w
  mad r0.w, r3.x, r0.w, r1.w
  movc r0.z, r0.x, r1.w, r0.w
endif
ge r0.x, l(4.093169975E-021), r2.w
discard_nz r0.x
ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r0.x, cb2[76].w, l(332), t7.xxxx
mul r1.xyz, r1.xyzx, l(1.000000, 0.000000, 0.000000, 0.000000)
mul r0.z, r0.z, l(60.000000)
if_nz r0.y
  ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r0.y, cb2[76].w, l(1036), t7.xxxx
  ine r0.w, r0.y, l(-2)
  if_nz r0.w
    mov_sat r2.x, r2.x
    ld_structured_indexable(structured_buffer, stride=24)(mixed,mixed,mixed,mixed) r3.xyzw, r0.y, l(0), t14.xyzw
    ld_structured_indexable(structured_buffer, stride=24)(mixed,mixed,mixed,mixed) r4.xy, r0.y, l(16), t14.xyxx
    utof r0.y, r0.y
    add r0.y, r0.y, l(0.500000)
    mul r2.y, r0.y, l(0.000976562500)
    sample_l_indexable(texture2d)(float,float,float,float) r5.xyz, r2.xyxx, t16.xyzw, s0, l(0.000000)
    mov r4.z, r3.w
    mad r2.xyz, r3.xyzx, r5.xyzx, r4.zxyz
  else
    ld_structured_indexable(structured_buffer, stride=1100)(mixed,mixed,mixed,mixed) r2.xyz, cb2[76].w, l(1084), t7.xyzx
  endif
endif
mul r0.y, l(0.500000), cb3[38].y
exp r0.y, r0.y
mul r1.xyz, r0.zzzz, r1.xyzx
mad r1.xyz, r2.xyzx, r0.zzzz, r1.xyzx
mul r0.yzw, r0.yyyy, r1.xxyz
mad r1.xyz, r0.yzwy, v9.xyzx, v10.xyzx
mul r3.xyz, r2.wwww, r1.xyzx
ieq r0.yz, r0.xxxx, l(0, 1, 2, 0)
movc r2.xyz, r0.zzzz, r3.xyzx, r1.xyzx
mov r3.w, l(0)
movc r2.xyzw, r0.yyyy, r3.xyzw, r2.xyzw
mov r1.w, l(1.000000)
movc o0.xyzw, r0.xxxx, r2.xyzw, r1.xyzw
ret
// Approximately 130 instruction slots used

///////////////////////////////// HLSL Code /////////////////////////////////
// // ---- Created with 3Dmigoto v1.3.16 on Tue Mar 15 22:27:45 2022
//
// struct ParticleGPUSystemData
// {
//     float4x4 cSystemToWorld;       // Offset:    0
//     uint cameraID;                 // Offset:   64
//     uint cDrawArgStart;            // Offset:   68
//     float4 textureFlipbookVecs[10];// Offset:   72
//     float3 cSpriteCenter;          // Offset:  232
//     float3 cSpriteSize;            // Offset:  244
//     float3 cSpriteSizeRandom;      // Offset:  256
//     float2 cUVScale;               // Offset:  268
//     float2 cUVOffset;              // Offset:  276
//     float2 cUVScroll;              // Offset:  284
//     uint cRibbonUVMode;            // Offset:  292
//     float cTimeStep;               // Offset:  296
//     uint cFlags;                   // Offset:  300
//     float cLifeTime;               // Offset:  304
//     float cLifeTimeRandom;         // Offset:  308
//     float cFogDensityStrength;     // Offset:  312
//     float cAge;                    // Offset:  316
//     uint systemRandom;             // Offset:  320
//     uint cAlignMode;               // Offset:  324
//     uint cSecondaryAlignMode;      // Offset:  328
//     uint cBlendMode;               // Offset:  332
//     float cAngleFadeRate;          // Offset:  336
//     float cSoftDistance;           // Offset:  340
//     float cSoftDistanceInverse;    // Offset:  344
//     float cVelocityScale;          // Offset:  348
//     float cVelocityScaleClamp;     // Offset:  352
//     float cExternalScale;          // Offset:  356
//     float cSpriteRotation;         // Offset:  360
//     float cSpriteCameraOffset;     // Offset:  364
//     float cStaticTwist;            // Offset:  368
//     float cTwistSpeed;             // Offset:  372
//     uint cTwistDirection;          // Offset:  376
//     float cMaxExtent;              // Offset:  380
//     float cColorModulate;          // Offset:  384
//     float cColorRandom;            // Offset:  388
//     struct {
//         float start;               // Offset:  392
//         float end;                 // Offset:  396
//         uint type;                 // Offset:  400
//         float alpha;               // Offset:  404
//         float jitter;              // Offset:  408
//     } cParticleColorBlend;         // Offset:  392
//     float4 cColorTintModulate;     // Offset:  412
//     struct {
//         float start;               // Offset:  428
//         float end;                 // Offset:  432
//         uint type;                 // Offset:  436
//         float alpha;               // Offset:  440
//         float jitter;              // Offset:  444
//     } cNormalMapIntensity;         // Offset:  428
//     struct {
//         float start;               // Offset:  448
//         float end;                 // Offset:  452
//         uint type;                 // Offset:  456
//         float alpha;               // Offset:  460
//         float jitter;              // Offset:  464
//     } cOpacity;                    // Offset:  448
//     struct {
//         float start;               // Offset:  468
//         float end;                 // Offset:  472
//         uint type;                 // Offset:  476
//         float alpha;               // Offset:  480
//         float jitter;              // Offset:  484
//     } cOpacityTexturesExponent;    // Offset:  468
//     struct {
//         float start;               // Offset:  488
//         float end;                 // Offset:  492
//         uint type;                 // Offset:  496
//         float alpha;               // Offset:  500
//         float jitter;              // Offset:  504
//     } cScale;                      // Offset:  488
//     float cCameraScaleStartDistance;// Offset:  508
//     float cCameraScaleStartValue;  // Offset:  512
//     float cCameraScaleEndDistance; // Offset:  516
//     float cCameraScaleEndValue;    // Offset:  520
//     float cCameraOneOverEndMinusStart;// Offset:  524
//     uint cFlipbookPageCount;       // Offset:  528
//     float cFlipbookPageCycle;      // Offset:  532
//     float cNearCull;               // Offset:  536
//     float cFarCull;                // Offset:  540
//     float cNearFade;               // Offset:  544
//     float cFarFade;                // Offset:  548
//     struct {
//         float start;               // Offset:  552
//         float end;                 // Offset:  556
//         uint type;                 // Offset:  560
//         float alpha;               // Offset:  564
//         float jitter;              // Offset:  568
//     } cDrag;                       // Offset:  552
//     float3 cGravity;               // Offset:  572
//     struct {
//         float start;               // Offset:  584
//         float end;                 // Offset:  588
//         uint type;                 // Offset:  592
//         float alpha;               // Offset:  596
//         float jitter;              // Offset:  600
//     } cGravityIntensity;           // Offset:  584
//     struct {
//         float start;               // Offset:  604
//         float end;                 // Offset:  608
//         uint type;                 // Offset:  612
//         float alpha;               // Offset:  616
//         float jitter;              // Offset:  620
//     } cWindInfluenceOverLifeTime;  // Offset:  604
//     float cMinDistance;            // Offset:  624
//     float cMaxDistance;            // Offset:  628
//     float3 cTurbulenceFrequency;   // Offset:  632
//     float3 cTurbulenceAmplitude;   // Offset:  644
//     float3 cTurbulencePhase;       // Offset:  656
//     float3 cTurbulenceScrollSpeed; // Offset:  668
//     struct {
//         float start;               // Offset:  680
//         float end;                 // Offset:  684
//         uint type;                 // Offset:  688
//         float alpha;               // Offset:  692
//         float jitter;              // Offset:  696
//     } cTurbulenceIntensity;        // Offset:  680
//     uint cActiveFields;            // Offset:  700
//     struct {
//         float3 position;           // Offset:  704
//         float attenuation;         // Offset:  716
//         float3 direction;          // Offset:  720
//         float maxDistance;         // Offset:  732
//         float magnitude;           // Offset:  736
//         float _pad0;               // Offset:  740
//         float _pad1;               // Offset:  744
//         float _pad2;               // Offset:  748
//     } cFields[4];                  // Offset:  704
//     float cNewtonMinDistance;      // Offset:  896
//     float cCollisionBounciness;    // Offset:  900
//     float cCollisionBouncinessRandom;// Offset:  904
//     float cCollisionRadius;        // Offset:  908
//     float cDepthCollisionAgeThreshold;// Offset:  912
//     float cDepthCollisionThreshold;// Offset:  916
//     float cPlaneCollisionHeight;   // Offset:  920
//     float3 emitterPosition;        // Offset:  924
//     float3 emitterVelocity;        // Offset:  936
//     float3 velocityDirectionWorld; // Offset:  948
//     float3x3 emitterOrientation;   // Offset:  960
//     float emitterDistance;         // Offset:  996
//     float cMFXEventProbability;    // Offset: 1000
//     uint4 ramp1Indices[2];         // Offset: 1004
//     uint4 ramp3Indices;            // Offset: 1036
//     uint4 ramp1Constants[2];       // Offset: 1052
//     float4 ramp3Constants;         // Offset: 1084
// };
//
// struct ParticleGPURamp1Data
// {
//     float multiplier;              // Offset:    0
//     float offset;                  // Offset:    4
// };
//
// struct ParticleGPURamp3Data
// {
//     float3 multiplier;             // Offset:    0
//     float3 offset;                 // Offset:   12
// };
//
// cbuffer ConstBuf__batchData : register(b2)
// {
//
//   struct
//   {
//
//     struct
//     {
//       uint4 lightIndices[8];
//     } objectLights;
//
//
//     struct
//     {
//       float3 invTransX;
//       float3 invTransY;
//       float3 invTransZ;
//       float3 invTransT;
//       float3 invRotX;
//       float3 invRotY;
//       float3 invRotZ;
//       uint3 indDims;
//       float3 invIndDims;
//       uint3 atlasDims;
//       float3 invAtlasDims;
//       float4 cr1Min;
//       float4 cr1MaxSubMin;
//       float4 cr2Min;
//       float4 cr2MaxSubMin;
//       float4 cr3Min;
//       float4 cr3MaxSubMin;
//       float normalOffset;
//       float4 giTintScaled;
//       uint flags;
//     } giVolume[3];
//
//     float4 m_EnvironmentMapSHR;
//     float4 m_EnvironmentMapSHG;
//     float4 m_EnvironmentMapSHB;
//     float2 m_EnvironmentMapRotation;
//     int m_EnvironmentMapMipCount;
//
//     struct
//     {
//       float4 m_WS2OBBSrow0;
//       float4 m_WS2OBBSrow1;
//       float4 m_WS2OBBSrow2;
//       float3 m_halfExtents;
//       float3 m_cubeCapturePos;
//     } m_EnvironmentProxy;
//
//     uint particleSystemIndex;
//
//     struct
//     {
//       float3 color;
//       uint lightgroupID;
//       float3 position;
//       float sourceRadiusSquared;
//       float falloffConstant;
//       float innerMinusOuterCosHalfAngleRcp;
//       float outerCosHalfAngle;
//       float dirLightHalfAngle;
//       float3 direction;
//       float dirLightSolidAngle;
//       int projectorIndex;
//       float fadeStartOnDist;
//       float fadeRcpDist;
//       float fadeRate;
//     } bonusMirrorLight;
//
//     float4x4 worldToShadowRegionUV;
//     float shadowFadeFactor;
//     uint numGIVolumes;
//     bool useBonusMirrorLight;
//     bool useShadowMap;
//   } resourceTables__batchData : packoffset(c0);
//
// }
//
// cbuffer ConstBuf__viewData : register(b3)
// {
//
//   struct
//   {
//     float4x4 view;
//     float4x4 invView;
//     float4x4 proj;
//     float4x4 invViewProjNoZReproj;
//     float4x4 viewProj;
//     float4x4 invViewProj;
//     float4x4 previousViewProj;
//     float4 prevLodEyePos;
//     float4 lodEyePos;
//     float4 viewDirDepthBias;
//     float3 eyePos;
//     float2 viewportSize;
//     float2 invViewportSize;
//     float4 mirrorPlaneWS;
//     float2 mirrorViewportSize;
//     float2 opaqueRefractionViewportSize;
//     float windTime;
//     float deltaTime;
//     float depthReprojectScale;
//     float depthReprojectBias;
//     uint shadowViewType;
//     float normalDepthBias;
//     float noNormalAA;
//     float noNormalFromAlpha;
//     float noOpaqueTransparency;
//     float translucentAmount;
//     uint framePhase;
//     float cameraAmbientExposure;
//     float fxExposure;
//     float fxAmbientExposure;
//     uint checkerboardPhase;
//     float sparkleIntensityScale;
//   } resourceTables__viewData : packoffset(c0);
//
// }
//
// SamplerState resourceTables__passData__smpLinearClamp_s : register(s0);
// SamplerState resourceTables__viewData__smpLinearClamp_s : register(s6);
// StructuredBuffer<ParticleGPUSystemData> resourceTables__passData.systemData : register(t7);
// StructuredBuffer<ParticleGPURamp1Data> resourceTables__passData.ramp1Data : register(t13);
// StructuredBuffer<ParticleGPURamp3Data> resourceTables__passData.ramp3Data : register(t14);
// Texture2D<float> resourceTables__passData.ramp1Textures : register(t15);
// Texture2D<float3> resourceTables__passData.ramp3Textures : register(t16);
// Texture2D<float> resourceTables__passData.linearDepthTexture : register(t20);
// Texture2D<float2> resourceTables__passData.bilateralVectorsTexture : register(t21);
//
//
// // 3Dmigoto declarations
// #define cmp -
// Texture1D<float4> IniParams : register(t120);
// Texture2D<float4> StereoParams : register(t125);
//
//
// void main(
//   float4 v0 : SV_POSITION0,
//   float3 v1 : POSITION0,
//   float3 v2 : NORMAL0,
//   float4 v3 : TEXCOORD0,
//   float3 v4 : TEXCOORD1,
//   float4 v5 : COLOR0,
//   float4 v6 : COLOR1,
//   float4 v7 : TEXCOORD2,
//   uint4 v8 : TEXCOORD3,
//   float4 v9 : TEXCOORD7,
//   float4 v10 : TEXCOORD8,
//   float4 v11 : TEXCOORD9,
//   float3 v12 : TEXCOORD10,
//   out float4 o0 : SV_Target0)
// {
//   float4 r0,r1,r2,r3,r4,r5;
//   uint4 bitmask, uiDest;
//   float4 fDest;
//
//   r0.xyzw = frac(v3.xyxy);
//   r1.xyzw = float4(1,1,0.5,0.5) + -r0.xyzw;
//   r0.x = r1.x * r0.z;
//   r0.x = log2(r0.x);
//   r0.x = 0.100759998 * r0.x;
//   r0.x = exp2(r0.x);
//   r0.x = r0.x + r0.x;
//   r0.y = log2(r1.y);
//   r0.y = 0.809370995 * r0.y;
//   r0.y = exp2(r0.y);
//   r0.z = log2(r0.w);
//   r0.z = 0.155118003 * r0.z;
//   r0.z = exp2(r0.z);
//   r0.y = r0.z * r0.y;
//   r0.x = r0.x * r0.y;
//   r0.yz = float2(0.5,0.5) + -abs(r1.zw);
//   r0.yz = float2(3.48077917,3.48077917) * r0.yz;
//   r0.yz = min(float2(1,1), r0.yz);
//   r0.yz = r0.yz * float2(3.14159274,3.14159274) + float2(-1.57079637,-1.57079637);
//   r0.yz = sin(r0.yz);
//   r0.yz = r0.yz * float2(0.5,0.5) + float2(0.5,0.5);
//   r0.y = r0.y * r0.z;
//   r0.x = r0.x * r0.y;
//   r0.y = cmp(4.09316998e-021 >= r0.x);
//   if (r0.y != 0) discard;
//   r0.y = resourceTables__passData.systemData[resourceTables__batchData.particleSystemIndex].cSoftDistance;
//   r0.z = resourceTables__passData.systemData[resourceTables__batchData.particleSystemIndex].cSoftDistanceInverse;
//   r1.xy = cmp(r0.yz == float2(0,0));
//   r0.w = r1.y ? r1.x : 0;
//   if (r0.w == 0) {
//     r1.xy = (int2)v0.xy;
//     r1.zw = float2(0,0);
//     r1.xy = resourceTables__passData.bilateralVectorsTexture.Load(r1.xyz).xy;
//     r1.xy = r1.xy * float2(8,8) + v0.xy;
//     r1.xy = resourceTables__viewData.invViewportSize.xy * r1.xy;
//     r0.w = resourceTables__passData.linearDepthTexture.SampleLevel(resourceTables__viewData__smpLinearClamp_s, r1.xy, 0).x;
//     r0.w = v4.z + r0.w;
//     r1.x = cmp(0 < r0.z);
//     r0.z = 1 / r0.z;
//     r0.z = r1.x ? r0.z : 0;
//     r0.y = r0.w / r0.y;
//     r0.y = min(1, abs(r0.y));
//     r1.x = r0.y * r0.y;
//     r0.y = -r0.y * 2 + 3;
//     r0.y = r1.x * r0.y;
//     r0.z = r0.w * r0.z;
//     r0.z = min(1, abs(r0.z));
//     r0.w = r0.z * r0.z;
//     r0.z = -r0.z * 2 + 3;
//     r0.z = -r0.w * r0.z + 1;
//     r0.y = r0.y * r0.z;
//   } else {
//     r0.y = 1;
//   }
//   r0.x = saturate(r0.x * r0.y);
//   r0.y = cmp(r0.x < 0.0404499993);
//   r0.z = 0.0773993805 * r0.x;
//   r0.x = 0.0549999997 + r0.x;
//   r0.x = 0.947867334 * r0.x;
//   r0.x = log2(r0.x);
//   r0.x = 2.4000001 * r0.x;
//   r0.x = exp2(r0.x);
//   r0.x = r0.y ? r0.z : r0.x;
//   r0.y = cmp(4.09316998e-021 >= r0.x);
//   if (r0.y != 0) discard;
//   r0.y = resourceTables__passData.systemData[resourceTables__batchData.particleSystemIndex].cFlags;
//   r1.x = resourceTables__passData.systemData[resourceTables__batchData.particleSystemIndex].cColorTintModulate.x;
//   r1.y = resourceTables__passData.systemData[resourceTables__batchData.particleSystemIndex].cColorTintModulate.y;
//   r1.z = resourceTables__passData.systemData[resourceTables__batchData.particleSystemIndex].cColorTintModulate.z;
//   r1.w = resourceTables__passData.systemData[resourceTables__batchData.particleSystemIndex].cColorTintModulate.w;
//   r0.z = resourceTables__passData.systemData[resourceTables__batchData.particleSystemIndex].ramp1Indices[1].y;
//   r2.xyzw = saturate(r1.xyzw);
//   r0.y = r0.y ? 0.000000 : 0;
//   r3.x = 1;
//   r3.w = v6.w;
//   r3.xyzw = r0.yyyy ? r3.xxxw : v6.xyzw;
//   r3.w = r3.w * r0.x;
//   r2.xyzw = r3.xyzw * r2.xyzw;
//   r0.xw = cmp((int2)r0.zz == int2(-2,-3));
//   r0.w = (int)r0.w | (int)r0.x;
//   if (r0.w == 0) {
//     r3.x = resourceTables__passData.ramp1Data[r0.z].multiplier;
//     r3.y = resourceTables__passData.ramp1Data[r0.z].offset;
//     r0.z = (uint)r0.z;
//     r0.z = 0.5 + r0.z;
//     r4.y = 0.000244140625 * r0.z;
//     r4.x = v7.y;
//     r0.z = resourceTables__passData.ramp1Textures.SampleLevel(resourceTables__passData__smpLinearClamp_s, r4.xy, 0).x;
//     r0.z = r3.x * r0.z + r3.y;
//   } else {
//     r0.w = resourceTables__passData.systemData[resourceTables__batchData.particleSystemIndex].ramp1Constants[1].y;
//     r1.w = f16tof32(r0.w);
//     r0.w = (uint)r0.w >> 16;
//     r0.w = f16tof32(r0.w);
//     r3.x = saturate(v7.y);
//     r0.w = r0.w + -r1.w;
//     r0.w = r3.x * r0.w + r1.w;
//     r0.z = r0.x ? r1.w : r0.w;
//   }
//   r0.x = cmp(4.09316998e-021 >= r2.w);
//   if (r0.x != 0) discard;
//   r0.x = resourceTables__passData.systemData[resourceTables__batchData.particleSystemIndex].cBlendMode;
//   r1.xyz = float3(1,0,0) * r1.xyz;
//   r0.z = 60 * r0.z;
//   if (r0.y != 0) {
//     r0.y = resourceTables__passData.systemData[resourceTables__batchData.particleSystemIndex].ramp3Indices[0].x;
//     r0.w = cmp((int)r0.y != -2);
//     if (r0.w != 0) {
//       r2.x = saturate(r2.x);
//       r3.x = resourceTables__passData.ramp3Data[r0.y].multiplier.x;
//       r3.y = resourceTables__passData.ramp3Data[r0.y].multiplier.y;
//       r3.z = resourceTables__passData.ramp3Data[r0.y].multiplier.z;
//       r3.w = resourceTables__passData.ramp3Data[r0.y].offset.x;
//       r4.x = resourceTables__passData.ramp3Data[r0.y].offset.y;
//       r4.y = resourceTables__passData.ramp3Data[r0.y].offset.z;
//       r0.y = (uint)r0.y;
//       r0.y = 0.5 + r0.y;
//       r2.y = 0.0009765625 * r0.y;
//       r5.xyz = resourceTables__passData.ramp3Textures.SampleLevel(resourceTables__passData__smpLinearClamp_s, r2.xy, 0).xyz;
//       r4.z = r3.w;
//       r2.xyz = r3.xyz * r5.xyz + r4.zxy;
//     } else {
//       r2.x = resourceTables__passData.systemData[resourceTables__batchData.particleSystemIndex].ramp3Constants[0].x;
//       r2.y = resourceTables__passData.systemData[resourceTables__batchData.particleSystemIndex].ramp3Constants[0].y;
//       r2.z = resourceTables__passData.systemData[resourceTables__batchData.particleSystemIndex].ramp3Constants[0].z;
//     }
//   }
//   r0.y = resourceTables__viewData.fxAmbientExposure * 0.5;
//   r0.y = exp2(r0.y);
//   r1.xyz = r1.xyz * r0.zzz;
//   r1.xyz = r2.xyz * r0.zzz + r1.xyz;
//   r0.yzw = r1.xyz * r0.yyy;
//   r1.xyz = r0.yzw * v9.xyz + v10.xyz;
//   r3.xyz = r1.xyz * r2.www;
//   r0.yz = cmp((int2)r0.xx == int2(1,2));
//   r2.xyz = r0.zzz ? r3.xyz : r1.xyz;
//   r3.w = 0;
//   r2.xyzw = r0.yyyy ? r3.xyzw : r2.xyzw;
//   r1.w = 1;
//   o0.xyzw = r0.xxxx ? r2.xyzw : r1.xyzw;
//   return;
// }
//////////////////////////////// HLSL Errors ////////////////////////////////
// F:\GamesSTEAM\steamapps\common\GodOfWar\ShaderFixes\ff1d452ce806f860-ps_replace.txt(287,65): error X3000: syntax error: unexpected token '.'
/////////////////////////////////////////////////////////////////////////////
